home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Disc to the Future 2
/
Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin
/
MAC
/
MPW_TOOL
/
TOOLS
/
TOOLS_WI
/
PLANET__
/
README
Wrap
Text File
|
1989-12-08
|
4KB
|
96 lines
Welcome to Planet.
Planet is freeware, and the copyright is retained by F.T. Mendenhall, 1985.
He has given permission to modify the source for the purpose of porting it to
other machines. Here is the original notice:
/* This is a c program - it runs on a VAX. Several people have
* told me that it can be made to run on PC's with some effort.
* I have not confirmed this, but subject to my copyright restriction
* your [sic] free try to make it work on any machine you want.
* good luck! */
/* Planets
* A program to determine the position of
* the Sun., Mer., Ven., Mars, Jup, Sat & Ura
* reference Jean Meesus's book, " Astronomical Formulae for
* Calculators
* program by
*
* F.T. Mendenhall
* ihnp4!inuxe!fred
*
* Copyright 1985 by F.T. Mendenhall
* all rights reserved
*
* (This copyright prevents you from selling the program - the
* author grants anyone the right to copy and install the program
* on any machine it will run on) */
End of original notice.
I have modified the source slightly to produce this MPW version. The
modifications I made were only enough to get it to run. I made no effort to
improve on the program. I did add a little error checking, but not much, so be
careful what you give as input.
In the original version, the user was prompted for information such as date
and time every time the program ran. This style is counter to the Apple
guidelines for MPW tools, and so I've modified it. If no information is given
at the command line, this usage statement is produced:
usage: Planet ([-i] | [month] [day] [year] [time])
[-l tz <longdeg> <longmin> <latdeg> <latmin>]
Time Zones: 0 = Universal 5 = EST 6 = CST 7 = MST 8 = PST
This is what it means: If you enter Planet -i, Planet will read the
information it needs from standard input. This is useful for scripts, and I've
provided one that will enter the information automatically.
If you don't use the -i option (i is for input), Planet will expect to find
certain information on the command line. Specifically, it needs the month, the
day, the year, and the time, all in numerical format. For example, right now
it's 12/8/89 and the time is 19:34:57. Planet expects that information in this
format: 12 8 89 1934.
I've provided a little tool called CvtDate that will convert output of MPW's
date command to the format needed by Planet. Thus Planet `date -s | CvtDate`
produces the positions of the planets for the current date and time.
Alternatively, date -s | CvtDate | Planet produces exactly the same results.
If you use the -l option, Planet expects the -l to be followed by one or more
location parameters (l is for location). These parameters tell Planet how your
location differs from the default location. The original assumed you lived in
Indianapolis, and if you lived elsewhere you had to change the values hardcoded
in the source. I have changed the location bias to San Francisco, but I have
added the -l option so you can tell Planet where you live without recompiling.
The location parameters must be given in the order shown in the usage
statement. Specifically, if you use the -l option, you must give time zone.
The other parameters are all optional, but for example in order to specify
latitude degrees, you must also specify longitude degrees and minutes.
Other features: I have added an 8-phase rotating cursor that looks a little
like a planet and its moon, or maybe a star and a planet. Anyway, it looks
astronomical. If you don't like it, just use ResEdit to delete the acur and
CURS resources in the tool.
Also provided are two scripts, Planets and FindChanges. Planets merely
connects the MPW date command with CvtDate and Planet to fully automate the
data input. If you don't live in San Fran, add the -l option after Planet -i.
FindChanges goes through the source and locates changes I made, in case you're
curious. If you move the source files around, you may have to change some path
names in the script.
Enjoy...
Matthew J. Snyder
compuserve 71450,2606
UUCP bmug!Matthew.Snyder@apple.com
NOTE: If I decide to split up the executable tool and the source into different
uploads, then the script FindChanges will be with the source upload only. If
you have the source upload, directions for building can be found in the make
files.